Move files from multiple folders all into parent directory with command prompt [win7]

Posted by Nick on Super User See other posts from Super User or by Nick
Published on 2010-08-25T14:47:49Z Indexed on 2010/12/27 21:56 UTC
Read the original article Hit count: 342

Filed under:
|
|
|

I have multiple .rar files in multiple folders like this:

C:\Docs\Folder1\rarfile1-1.rar
C:\Docs\Folder1\rarfile1-2.rar
C:\Docs\Folder1\rarfile1-3.rar  

C:\Docs\Folder2\rarfile2-1.rar
C:\Docs\Folder2\rarfile2-2.rar
C:\Docs\Folder2\rarfile2-3.rar  

C:\Docs\Folder3\rarfile3-1.rar
C:\Docs\Folder3\rarfile3-2.rar
C:\Docs\Folder3\rarfile3-3.rar  

I want to move all of the .rar files to the parent directory 'C:\Docs'. I have a lot more than 3 folders, so I was thinking of making a batch file or something. What would be the commands to do this?
Thanks

© Super User or respective owner

Related posts about windows-7

Related posts about command-line